/**
 * Display ranking for the given runType
 * 
 * @param args.runType default value = ALL
 */
function main()
{
	var url = "/gwi/run/ranking.json";
	var runType = args.runType;
	if(runType == null || runType == ""){
		runType = "ALL";
	}
	url += "?runType=" + runType;
	var result = remote.call(url);

	var ranking = new Array(); 
	if (result.status == 200 && result != "{}"){
		var json = eval('(' + result + ')');
		ranking = json.ranking;
	}
	model.runType = runType;
	model.ranking = ranking;
}

main();